import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('@/views/Home.vue')
  },
  {
    path: '/java-basic/:topic',
    name: 'syntax-detail',
    component: () => import('@/views/java-basic/SyntaxDetail.vue')
  },
  {
    path: '/html-preview',
    name: 'html-preview',
    component: () => import('@/components/HtmlPreview.vue')
  }
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})

export default router
